home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MISC.SWG / 0003_DBASE4.PRG.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  5KB  |  134 lines

  1. {
  2. Hello every one... Guys and gals is there any such a thing that you can
  3. use turbp pascal 6 with Dbase IV.. what I heard is I can.
  4. if yes tell me how you export or whatever to use two of thewm
  5. together,,,
  6.  
  7. Yes there is! I have been using it for some time now in dBase as I use
  8. an XT and dBase's editor is too slow when the program has quite a few
  9. lines (some are 5,000) and the system just kind of dies. When I use TP's
  10. IDE the editor is FAST!!!! So after reading the books I designed a
  11. program in order to use TP as using it in the TEDIT CONFIG.DB command
  12. wouldn't work as it needed more memory (I only have 640k).
  13. }
  14.  
  15.  
  16. In dBase's setup program, under the FILES MENU enter in either
  17. PRGAPPLIC (overrides Application Control in the ASSIST menu only!) or
  18.  Entry  - C:\DBASEIV\EDIT2.PRG
  19.  Exit   - empty
  20.  Layout - empty
  21. PRGCC (allows you to use OPEN CUSTOM UTILIY option under Catalog Menu).
  22.  Entry  - empty
  23.  Exit   - empty
  24.  Layout - C:\DBASEIV\EDIT2.PRG
  25.  
  26. I am currently using PRGAPPLIC as I do most of my work in the Control
  27. Center anyhow and don't need the Application Generator. Note - PRGCC
  28. will not pull in a PRG file unless you change the source code to ask for
  29. one.
  30.  
  31. Here is the dBase program that calls Turbo Pascal:
  32.  
  33. * <T>Program ----> EDIT2.PRG
  34. * <D>Language ---> dBase IV 1.5
  35. * <P>Author -----> P.A.T. Systems° C.1993
  36. * <T>Creation date -> 07/22/1992
  37. * <L>Last update ---> 01/06/1993
  38.  
  39. * <G>From-> Control Center
  40. * <N>To---> None
  41. * <T>Subs-> None
  42.  
  43. * This program invokes an External Editor such as Turbo Pascal 6.0's
  44. * (TP) Desktop Editor by using the PRGAPPLIC setup in the Config.db
  45. * file. Even though it is only for Entry Programs, with some tricky
  46. * commands we can get it to invoke an External Editor such as TP.
  47.  
  48. * Although I can't do any Compiling or Help Lookup (another use for the
  49. * Manuals), it still is a great and FAST!!!! Editor to work with.
  50.  
  51. * This program will work with any editor that will accept a filename
  52. * as a parameter.
  53.  
  54. * Example  TURBO filename.prg  (Turbo Pascal) OR
  55. * WP filename.prg     (Word Perfect)
  56.  
  57. * As I am used to TP's Editor, I wished I could use it when I wanted to
  58. * edit a program.  Especially a long program that when loaded into
  59. * dBase's editor is extremely slow, but in TP, editing is FAST!!! And
  60. * with dBase IV 1.5's NEW Open Architecture, I now have a way to do it.
  61.  
  62. * This program uses the RUN() function to swap out memory to disk so
  63. * that the editor can load in.  With the TEDIT command in the Config.db
  64. * setup, there wasn't enough memory (on an XT) to load in the editor.
  65. * So I read the manuals (Yes, I do read them occasionally!) and figured
  66. * out a way to use an External Editor by utilizing the Control Center's
  67. * NEW Open Architecture.
  68.  
  69. * First, copy this program into dBase's Startup Directory.
  70.  
  71. * You next have to change dBase's setup using DBSETUP at the DOS prompt
  72. * and load in the current configuration and then on the Files Menu
  73. * change the option of PRGAPPLIC so that it reads
  74. * "C:\DBASEIV\EDIT2.PRG". Once done, save the new configuration and
  75. * exit to DOS.  Then enter dBase in your usual way.  Next, create or
  76. * edit an existing program through the Control Center's Application
  77. * Menu.  The Control Center will execute this .PRG file (it will
  78. * automatically compile it) and load up your Editor with the program
  79. * ready to edit!
  80.  
  81. * ***Note***
  82. *  This program will only work through the Control Center.  If you type
  83. *  "MODI COMM filename" at the DOT PROMPT, the original editor will be
  84. *  loaded as the Open Architecture only works with the Control Center
  85. *  applications.
  86.  
  87. * Hope you enjoy this program!!!!
  88.  
  89. * Parameters passed from Control Center to Application Designer
  90. * Panel Name, Filename (Programming in dBase IV - Chapter 17, pg 4)
  91.  
  92. PARAMETERS cPanelName, cFileName
  93.  
  94. * Clear screen and turn on cursor
  95. * (MODI COMM turns off cursor when loading and then turns it back
  96. * on when editing - Why? I don't know. When I invoked my editor, I
  97. * found that the cursor had disappeared, so I included this Command
  98. * and my cursor came back!)
  99.  
  100. CLEAR
  101. SET CURSOR ON
  102.  
  103. * Store Editor's filename and dBase .PRG Filename to variable for
  104. * Macro Execution
  105.  
  106. * (You can enter your own Editor's file name here if you wish, just
  107. * include the FULL PATH NAME just in case, and don't forget the SPACE!)
  108.  
  109. * uncomment this line for PRGCC or it will load CATALOG FILE
  110. * STORE "" TO cFileName
  111. STORE "D:\TP\TURBO " + cFileName TO cExecEdit
  112.  
  113. * Invoke RUN() function to swap out memory
  114.  
  115. STORE RUN("&cExecEdit",.T.) TO nRun
  116.  
  117. * Change filename so we can erase .DBO file for proper compiling
  118. * If creating a new file, no need to erase .DBO file
  119.  
  120. IF .NOT. ISBLANK(cFileName)
  121.    STORE SUBSTR(cFileName, 1, AT(".PRG", cFileName)) + "DBO" TO ;
  122.     cExecEdit
  123.  
  124. * Erase the .DBO file
  125.  
  126.    ERASE &cExecEdit
  127. ENDIF
  128.  
  129. * Return directly to Control Center instead of invoking Command Editor
  130.  
  131. RETURN TO MASTER
  132.  
  133. * End
  134.